"""
Project Name : api_automation_framework
File Name : range_demo.py
Author : lldhsds
Date : 2024/12/28 18:39
Description: /range/{numbytes}, 使用给定的种子生成 n 个随机字节流，每个数据包的大小为给定的块大小。
"""

import requests

def range_demo(numbytes: str) -> None:
    """
    /range/{numbytes}, Streams n random bytes generated with given seed, at given chunk size per packet.
    :param numbytes: int
    :responses 200 Bytes.
    """
    url = f"http://httpbin.org/range/{numbytes}"
    headers = {'Accept': 'application/octet-stream'}
    response = requests.get(url, headers=headers)
    print(response.status_code)
    print(response.text)
    print(response.content)
    print(response.headers)

range_demo(10)